
{***********************************************************}
{                                                           }
{      Informix esql "sqliapi.h"                            }
{                                                           }
{      Translated to Object Pascal by                       }
{      Copyright (c) 2001-2008 Luxena Software Company      }
{      http://www.luxena.com                                }
{      e-mail: support@luxena.com                           }
{                                                           }
{***********************************************************}

unit IfxSqlIApi;

{$I lx.inc}

interface

uses
  LXTypes, IfxTypes, IfxSqlHdr, IfxSqlda, IfxCollect;

const
  ESQLINTVERSION = 1;

type

  Tsqli_cl_alloc = function(version: int4; collection: PPIfx_Collection; typed: PIfx_typerow): mint; cdecl;
  Tsqli_desc_alloc = function(descname: PChar; occurrence: mint): mint; cdecl;
  Tsqli_desc_dealloc = function(desc_name: PChar): mint; cdecl;
  Tsqli_desc_get = function(version: int4; desc_name: PChar; sqlvar_num: mint; hosttab: PIfx_hostvar; xopen_flg: mint): mint; cdecl;
  Tsqli_desc_set = function(version: int4; desc_name: PChar; sqlvar_num: mint; hosttab: PIfx_hostvar; xopen_flg: mint): mint; cdecl;
  Tsqli_trans_begin = function: mint; cdecl;
  Tsqli_trans_begin2 = function(replication: mint): mint; cdecl;
  Tsqli_trans_commit = function: mint; cdecl;
  Tsqli_trans_rollback = function: mint; cdecl;
  Tsqli_curs_decl_stat = function(version: int4; cursor: PIfx_cursor; curname: PChar; cmdtxt: PPChar; idesc: PIfx_sqlda; odesc: PIfx_sqlda; flags: int4; litvalues: PIfx_literal; namelist: PIfx_namelist; statement_type: mint; position: mint; col_stmt_flag: mint): mint; cdecl;
  Tsqli_curs_decl_dynm = function(version: int4; cursor: PIfx_cursor; curname: PChar; stmt: PIfx_cursor; flags: int4; col_stmt_flag: mint): mint; cdecl;
  Tsqli_curs_fetch = function(version: int4; cursor: PIfx_cursor; idesc: PIfx_sqlda; odesc: PIfx_sqlda; odesc_name: PChar; fetchspec: P_FetchSpec): mint; cdecl;
  Tsqli_autofree_set = function(version: int4; cursor: PIfx_cursor; status: mint): mint; cdecl;
  Tsqli_defprep_set = function(status: mint): mint; cdecl;
  Tsqli_curs_open = function(version: int4; cursor: PIfx_cursor; idesc: PIfx_sqlda; desc_name: PChar; IValues: PValue; useflag: mint; reoptflag: mint): mint; cdecl;
  Tsqli_curs_locate = function(version: int4; name: PChar; AType: mint): PIfx_cursor; cdecl;
  Tsqli_curs_flush = function(version: int4; cursor: PIfx_cursor): mint; cdecl;
  Tsqli_curs_close = function(version: int4; cursor: PIfx_cursor): mint; cdecl;
  Tsqli_curs_free = function(version: int4; cursor: PIfx_cursor): mint; cdecl;

  Tsqli_prep = function(version: int4; name: PChar; stmt: PChar; litvalues: PIfx_literal; namelist: PIfx_namelist; statement_type: mint; position: mint; col_stmt_flag: mint): PIfx_cursor; cdecl;
  Tsqli_describe_stmt = function(version: int4; cursor: PIfx_cursor; descp: PPIfx_sqlda; desc_name: PChar): mint; cdecl;
  Tsqli_db_open = function(db_name: PChar; exclusive: mint): mint; cdecl;
  Tsqli_db_close = function: mint; cdecl;
  Tsqli_exec = function(version: int4; cursor: PIfx_cursor; idesc: PIfx_sqlda; idesc_name: PChar; IValues: PValue; odesc: PIfx_sqlda; odesc_name: PChar; ovalues: PValue; chkind: mint): mint; cdecl;
  Tsqli_exec_immed = function(stmt: PChar): mint; cdecl;
  Tsqli_proc_create = function(fname: PChar): mint; cdecl;
  Tsqli_proc_exec = function(version: int4; cursor: PIfx_cursor; cmdtxt: PPChar; icnt: mint; ibind: PIfx_sqlvar; ocnt: mint; obind: PIfx_sqlvar; chkind: mint; freecursor: mint): mint; cdecl;
  Tsqli_proc_exec_2 = function(version: int4; cursor: PIfx_cursor; cmdtxt: PPChar; icnt: mint; ibind: PIfx_sqlvar; ocnt: mint; obind: PIfx_sqlvar; sysdesc: mint; chkind: mint; freecursor: mint): mint; cdecl;
  Tsqli_diag_get = function(version: int4; hosttab: PIfx_hostvar; exception_num: mint): mint; cdecl;
  Tsqli_curs_put = function(version: int4; cursor: PIfx_cursor; idesc: PIfx_sqlda; desc_name: PChar): mint; cdecl;
  Tsqli_slct = function(version: int4; cursor: PIfx_cursor; cmdtxt: PPChar; icnt: mint; ibind: PIfx_sqlvar; ocnt: mint; obind: PIfx_sqlvar; chkind: mint; litvalues: PIfx_literal; namelist: PIfx_namelist; col_smt_flag: mint): mint; cdecl;
  Tsqli_stmt = function(version: int4; scb: PIfx_statement; cmdtxt: PPChar; icnt: mint; ibind: PIfx_sqlvar; IValues: PValue; litvalues: PIfx_literal; namelist: PIfx_namelist; cur_wco: PIfx_cursor; stmttype: mint; position: mint; col_smt_flag: mint): mint; cdecl;
  Tsqli_stop_whenever = procedure; cdecl;
  Tsqli_connect_open = procedure(version: int4; conn_kw: mint; dbenv: PChar; conn_name: PChar; conn_spec: PIfx_conn; concur_tx: mint); cdecl;
  Tsqli_connect_close = procedure(conn_kw: mint; conn_name: PChar; flag: mint; from_reassoc: mint); cdecl;
  Tsqli_connect_set = procedure(conn_kw: mint; conn_name: PChar; dormant: mint); cdecl;
  T_iqseterr = procedure(sys_errno: mint); cdecl;
  Tsqli_mt_ibc = procedure(cnt: mint); cdecl;
  Tsqli_mt_ibind = procedure(AType: mint; address: PChar; length: mint; itype: mint; iaddress: PChar; ilength: mint; ownerlen: mint; owner: PChar; udtlen: mint; udtname: PChar; complexlen: mint; complexname: PChar; sourcetype: int2; sourceid: int4); cdecl;
  Tsqli_mt_obc = procedure(cnt: mint); cdecl;
  Tsqli_mt_obind = procedure(AType: mint; address: PChar; length: mint; itype: mint; iaddress: PChar; ilength: mint; ownerlen: mint; owner: PChar; udtlen: mint; udtname: PChar; complexlen: mint; complexname: PChar; sourcetype: int2; sourceid: int4); cdecl;
  Tsqli_mt_stmnt = procedure(sqlcmdtxt: PPChar; incnt: mint); cdecl;
  Tsqli_mt_slct = procedure(sqlcmdtxt: PPChar; incnt: mint; outcnt: mint; chkind: mint); cdecl;
  Tsqli_mt_copen = procedure(version: int4; curname: PChar; incnt: mint; desc: PIfx_sqlda; dname: PChar; useflag: mint; reoptflag: mint); cdecl;
  Tsqli_mt_nftch = procedure(version: int4; curname: PChar; outcnt: mint; incnt: mint; fetch_type: mint; value: int4; odesc: PIfx_sqlda; idesc: PIfx_sqlda; chk: mint; odname: PChar); cdecl;
  Tsqli_mt_free = procedure(name: PChar); cdecl;
  Tsqli_mt_close = procedure(name: PChar); cdecl;
  Tsqli_mt_flush = procedure(name: PChar); cdecl;
  Tsqli_mt_insput = procedure(version: int4; curname: PChar; incnt: mint; desc: PIfx_sqlda; dname: PChar); cdecl;
  Tsqli_mt_dclcur = procedure(version: int4; curname: PChar; sqlcmdtxt: PPChar; incnt: mint; outcnt: mint; scrflag: int4; lit: PIfx_literal; namelist: PIfx_namelist; stmttype: mint; position: mint; collstmt: mint); cdecl;
  Tsqli_mt_prepare = procedure(name: PChar; from: PChar); cdecl;
  Tsqli_mt_execute = procedure(name: PChar; incnt: mint; indname: PChar; outcnt: mint; outdname: PChar; chkind: mint); cdecl;
  Tsqli_mt_dyndcl = procedure(curname: PChar; sname: PChar; flags: int4); cdecl;
  Tsqli_mt_describe = procedure(version: int4; sname: PChar; desc: PPIfx_sqlda; dname: PChar); cdecl;
  Tsqli_mt_database = procedure(dbname: PChar; excl: mint); cdecl;
  Tsqli_mt_exproc = procedure(stmt: PChar; num_ibind: mint; num_obind: mint; chkind: mint); cdecl;
  Tsqli_mt_connect = procedure(version: int4; conn_kw: mint; dbenv: PChar; conn_name: PChar; conn_hdl: Pointer; concur_tx: mint); cdecl;
  Tsqli_mt_disconnect = procedure(conn_kw: mint; conn_name: PChar); cdecl;
  Tsqli_mt_setconnect = procedure(conn_kw: mint; conn_name: PChar); cdecl;
  Tsqli_mt_rerror = procedure(msg: PChar); cdecl;
  Tsqli_mt_alloc_isqlda = function(version: int4; cnt: mint): Pointer; cdecl;
  Tsqli_mt_alloc_literal = function(version: int4; cnt: mint): PIfx_literal; cdecl;
  Tsqli_mt_alloc_osqlda = function(version: int4; cnt: mint): Pointer; cdecl;
  Tsqli_mt_hostbind = procedure(version: int4; htab: PIfx_hostvar; vnum: mint; AType: mint; qualifier: mint; length: mint; addr: PChar); cdecl;
  Tsqli_mt_litbind = procedure(version: int4; lit: PIfx_literal; Addr: PChar; AType: int2; len: int2; qual: int2; literal: int2); cdecl;
  Tsqli_setdormant = function(status: int2): mint; cdecl;


implementation

end.